//
//  CustomUISwitch.m
//  UI04_Switch_Slider_SegmentedCintrol
//
//  Created by aaaaaa on 16/6/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CustomUISwitch.h"

@implementation CustomUISwitch

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setProperty];
    }
    return self;
}

- (void)setProperty{
    
    //设置状态
    self.on = NO;
    
    //setOn 设置状态 YES为on NO为off
    //animated 设置是否有动画
    [self setOn:NO animated:YES];
    
    //on状态下的背景色
    self.onTintColor = [UIColor orangeColor];
    
    //边框颜色
    self.tintColor = [UIColor redColor];
    
    //小圈的颜色
    self.thumbTintColor = [UIColor purpleColor];
    
}


@end
